<template>
  <div class="main-div">
    <el-breadcrumb separator-class="el-icon-arrow-right">
      <el-breadcrumb-item :to="{ path: '/welcome' }">首页</el-breadcrumb-item>
      <el-breadcrumb-item>{{path1}}</el-breadcrumb-item>
      <el-breadcrumb-item>{{path2}}</el-breadcrumb-item>
    </el-breadcrumb>
    <el-card class="child-card">
      <router-view @return-path="getPath"></router-view>
    </el-card>
  </div>
</template>

<script>
export default {
  data() {
    return {
      path1: "",
      path2: ""
    };
  },
  methods: {
    getPath(path) {
      this.path1 = path[0];
      this.path2 = path[1];
    }
  }
};
</script>

<style lang='less' scoped>
.main-div {
  background-color: #f2f2f2;
  background-size: 100% 100%;
  height: 100%;
  width: 100%;
  .child-card{
    height: 95%;
    margin-top: 15px;
  }
  .el-breadcrumb{
    font-size: 13px
  }
}
</style>